import 'package:flutter/material.dart';
import 'package:flutter_rider/main/widgets/ext/u_text.dart';
import 'package:flutter_rider/main/widgets/ui_constant.dart';
import 'package:flutter_rider/utils/screen_fit.dart';

class DetailFlexStartLayout extends StatelessWidget {
  String title;
  Color? titleColor;
  String value;
  Color? valueColor;
  FontWeight? valueFont;
  double ? pixel;
  DetailFlexStartLayout(this.title, this.value,{this.titleColor, this.valueColor, this.valueFont, this.pixel ,Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
      16.wspace,
      SizedBox(
          width: 80.rpx,
          child: UText.get(title, titleColor ?? UIColor.color_t7, pixel ?? 16.rpx)),
      Expanded(
        child: UText.get(value, valueColor ?? UIColor.color_t1, pixel ?? 16.rpx,
            fw: valueFont ?? FontWeight.normal),
      ),
      16.wspace,
    ]);
  }
}
